package com.drawu.drawuspring.service;

import com.drawu.drawuspring.domain.DTO.CommentDTO;
import com.drawu.drawuspring.domain.DTO.PostDTO;
import com.drawu.drawuspring.domain.Result;
import com.drawu.drawuspring.domain.VO.CommentVO;
import com.drawu.drawuspring.domain.po.Comments;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 评论表 服务类
 * </p>
 *
 * @author hui
 * @since 2024-10-14
 */
public interface ICommentsService extends IService<Comments> {

    /**
     * 添加评论
     */
    Result addComment(CommentDTO dto);


    /**
     * 根据postId获取评论列表
     */
    List<CommentVO> getCommentsByPostId(Integer type, Integer postId);

    /**
     * 根据postId获取评论数量
     */
    Integer getCommentCountByPostId(Integer postId);

    Result replyComment(PostDTO dto) throws Exception;

    Result deleteComment(Integer postId, Integer commentId);

    Result uploadImage(MultipartFile mpFile);
}
